console.log('用户id', process.getuid) // undefined
console.log('Node的命令行参数列表', process.argv) // [Node 路径, 当前文件路径， ....]
console.log('进程id', process.pid) // 13148 分配的随机id
console.log('当前目录', process.cwd()) // C:\leanGit\2.常用模块\2.8多进程服务\4.process
console.log(__dirname) // 同上 C:\leanGit\2.常用模块\2.8多进程服务\4.process
console.log('Node版本', process.version) // v10.16.2
process.env = 'dev'
console.log(process.env) // dev  若上面不重写，将会返回一系列和当前进程相关的环境变量或者全局变量
process.on('beforeExit', () => {
  setInterval( item => {
    console.log('Process will not exit ' + item)
  }, 1000, 'test arg')
})

process.on('exit', () => {
  setInterval( item => {
    console.log('Process will not exit ' + item)
  }, 1000, 'test arg')
})
process.exit()